1. Field of the Invention
The present invention is directed to a system for controlling the flow of data to a network based on a rate at which data is read from the network. The invention has particular utility in connection with transmitting video data over the Internet, since it reduces data overflow, data underflow, and network congestion, thereby enhancing video quality.
2. Description of the Related Art
Existing network systems currently have the ability to transmit real-time video, comprised of audio-visual data, between different nodes. The Internet in particular has, in recent-years, experienced a marked increase in the amount of video being passed therethrough. As anyone who has experienced networked video (in particular, Internet video) is aware, however, it leaves much to be desired. For example, motion in such video often appears stilted, rather than fluid. Likewise, image motion and audio data may not coincide, thereby further degrading the quality of the video.
There are a number of reasons for the foregoing problems with network video, one of which relates to flow control of data moving through the network. Taking the Internet as an example, the Internet uses user datagram protocol (xe2x80x9cUDPxe2x80x9d) in processing data from xe2x80x9cstreamingxe2x80x9d applications, i.e., multimedia applications which output xe2x80x9cstreamsxe2x80x9d of video data to the Internet. UDP, however, has no inherent flow control, meaning that it outputs video data without regard to the amount of data currently on the network. In cases where the network is already at capacity, this can result in a loss of video data, thereby decreasing the quality of the video, as described above. On the other hand, where there is excess capacity on the network, this can result in gaps in the video data, and thus in the resulting video, which likewise decreases the video""s quality.
Additional problems also arise from the lack of flow control inherent, in particular, in UDP-orientated multimedia applications. More specifically, because these applications output video data without regard to the current capacity of the network, they can be a threat to existing applications, like ftp, telnet, etc., that run atop more socially-minded protocols such as transport control protocol (xe2x80x9cTCPxe2x80x9d). In fact, a proliferation of poorly-designed UDP multimedia applications can congest the Internet resulting, in the most extreme case, in a congestion collapse thereof.
Conventional developers have addressed the foregoing problems in the art by synchronizing the operation of a transmitter which outputs data to a network with the operation of a receiver which reads data from the network. For example, the Network Voice Terminal (xe2x80x9cNeVoTxe2x80x9d) application, developed by the University of Massachusetts for audio-conferencing over a network, uses a single audio sampling clock to control transfer of audio data from an input device (e.g., a microphone) to the network, and from the network to an output device (e.g., a speaker). That is, each time the input device delivers a full block of audio to the application, one equal duration block of audio is copied from a playout buffer on the network to the output device.
While the foregoing solution reduces buffer overflow and underflow by coupling input and output timing, it has several drawbacks resulting from the fact that it does not take into account the characteristics of the intermediate network. For example, in the conventional flow control method described above, data is sent to the network at as high a speed as the network interface can handle, regardless of the bandwidth of the network. If the network has a bandwidth that cannot handle high bitrates, this will lead to congestion on the network, which can cause data loss and degrade network performance.
Accordingly, there exists a need for a system which controls the flow of data to a network, such as the Internet, so as to reduce both network congestions and the deleterious effects resulting from buffer overflow and underflow.
The present invention addresses the foregoing need by determining an amount of data that has been read from a network (e.g., the Internet) in a predetermined time period, and then outputting substantially the same amount of data to the network in the same predetermined time period. By controlling the rate at which data is output to the network in this manner, the present invention is able to reduce network congestion, without introducing substantial buffer overflows and/or underflows into the system.
Thus, according to one aspect, the present invention is a system (i.e., a method, an apparatus, and computer-executable process steps) which controls data output to a network. The system determines a maximum amount of data that could be output to the network based on an amount of data that can be read from the network during a predetermined time period, and then obtains a difference between an amount of data which has actually been output to the network and the maximum amount. Thereafter, the system outputs, to the network and within the predetermined time period, an amount of data packets that is based on the difference.
In preferred embodiments, these data packets include intra (xe2x80x9cIxe2x80x9d) frames of video, together with predictive (xe2x80x9cPxe2x80x9d) frames and/or bi-directional (xe2x80x9cBxe2x80x9d) frames of video. In these embodiments, the intra frames are output to the network, while at least some of the predictive frames and/or the bi-directional frames are not. Whether the predictive and/or bi-directional frames are, or are not, output varies depending upon the bandwidth of the network. By virtue of these features of the invention, it is possible to preserve the most important frames (i.e., the intra frames) when the bandwidth of the network is not sufficient to accommodate all frames. This most often, although not always, occurs in the case of variable-bandwidth networks.
In other preferred embodiments of the invention, for a last data packet to be output to the network in the predetermined time period, the system determines a first number of bits by which an amount of data will exceed the difference in the event that the data packet is output to the network, determines a second number of bits by which an amount of data will fall short of the difference in the event that the data packet is not output to the network, and outputs the data packet in a case that the first number is less than the second number, but not in a case that the first number is greater than the second number. By virtue of these features, the invention is able to output an amount of data to the network which most closely corresponds to the network""s capacity. The invention is therefore able to maintain as high a data throughput as possible under the circumstances, without substantial buffer overflow and/or underflow.
In still other preferred embodiments, the invention determines the maximum amount of data which could be output to the network based on a maximum amount of data that can be handled by a network segment having the least amount of available bandwidth. That is, in this case, the xe2x80x9cbottleneckxe2x80x9d (i.e., the portion of the network having the least amount of available bandwidth) will dictate the maximum rate at which data can be output to, and read from, the network. To accommodate this, the present invention allows the bandwidth of the bottleneck to control the flow of data to and from the network. This reduces the chances of network congestion and buffer overflow and underflow resulting from the bottleneck.
According to another aspect, the present invention is a network system in which flows of video data are controlled so as to reduce data congestion on the network. The network system includes a transmitter which codes the video data and which outputs coded video data to the network. Also included in the system is a receiver which reads the coded video data from the network at a predetermined rate (which is dictated, e.g., by the bandwidth of the network""s bottleneck), which decodes the coded video data, and which forms images based on the decoded video data. According to the invention, the transmitter outputs the coded video data to the network at substantially a same rate at which the receiver reads the coded video data from the network. By outputting the coded video data to the network at substantially the same rate at which the receiver reads the coded video data from the network, the invention is able to reduce network congestion and, in addition, to reduce occurrences of substantial buffer overflow and underflow.
This brief summary has been provided so that the nature of the invention may be understood quickly. A more complete understanding of the invention can be obtained by reference to the following detailed description of the preferred embodiment thereof in connection with the attached drawings.